package com.doit.excersise.conf;

import com.zaxxer.hikari.HikariDataSource;
import io.shardingjdbc.core.api.config.MasterSlaveRuleConfiguration;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashMap;
import java.util.Map;

/**
 * 描述
 *
 * @author Y.S.K
 * @date 2018/7/18 15:06
 */
@Data
@ConfigurationProperties(prefix = "sharding.jdbc")
public class ShardingMasterSlaveConfig {

    private Map<String, HikariDataSource> dataSources = new HashMap<>();

    private MasterSlaveRuleConfiguration masterSlaveRule;

	public Map<String, HikariDataSource> getDataSources() {
		return dataSources;
	}

	public void setDataSources(Map<String, HikariDataSource> dataSources) {
		this.dataSources = dataSources;
	}

	public MasterSlaveRuleConfiguration getMasterSlaveRule() {
		return masterSlaveRule;
	}

	public void setMasterSlaveRule(MasterSlaveRuleConfiguration masterSlaveRule) {
		this.masterSlaveRule = masterSlaveRule;
	}
    
    
}
